package org.news.service.Impl;

import java.util.List;

import org.news.Mapper.newsMapper;
import org.news.entity.news;
import org.news.service.newsService;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;

public class newsServiceImpl implements newsService {

	private newsMapper newsMapper;

	public void setNewsMapper(newsMapper newsMapper) {
		this.newsMapper = newsMapper;
	}

	@Override
	public int addNew(news n) {		
		return newsMapper.addNew(n);
	}
	
	public news seleOneNew(news n){
		return newsMapper.seleOneNew(n);
	}

	@Override
	public List<news> seleAllNews() {		
		return newsMapper.seleAllNews();
	}

	@Override
	public List<news> seleNewsBySort(news n) {		
		return newsMapper.seleNewsBySort(n);
	}

	@Override
	public int deleNewsBySort(news n) {	
		return newsMapper.deleNewsBySort(n);
	}

	@Override
	public int updateNewById(news n) {		
		return newsMapper.updateNewById(n);
	}

	@Override
	public int deleNewById(news n) {
		return newsMapper.deleOneNewById(n);
	}


	
}
